home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-05-06 | 5.2 KB | 142 lines | [TEXT/MPS ] |
- Kibitz is broken up into a lot of files to (hopefully) make things easier for
- you to use. We realize that you don't want a lot of the application-specific
- code, so it is separated from the rest rather well. (We will be separating
- it even more in the next version.)
-
- Unfortunately, having a lot of files can sometimes make finding a specific
- function more difficult. In this roadmap, I will describe the basic purpose
- of each file.
-
-
- KIBITZ C CODE:
-
- AEchess.c
- This is the application-specific AppleEvents code. The dispatcher, as well
- as the application-specific dispatcher are both found here. This is so that
- AppleEvents.c can remain unchanged, or at least have a chance at not changing.
-
- AppleEvents.c
- This file holds the core AppleEvents code. There is a very useful function
- in this file called MakeTarget (by Keith Rollin). This function creates
- a target descriptor for the AppleEvents, and it does it in a way that handles
- many of the variations, such as sending to yourself. If you are going to
- use AppleEvents, you will like MakeTarget.
-
- BoardSlider.c
- This is the code for the custom slider. It is very application-specific, and
- is probably not of great use to anyone.
-
- Chess.c
- This is definitely application-specific code. If you are interested, then take
- a look. Otherwise, save yourself some time. (I didn't comment this as much,
- since it is so application-specific.)
-
- Config.c
- Application-specific configuration dialog code. Again, look if you want.
-
- DoCursor.c
- This is the code for handling the cursor and for figuring out the cursor
- region for WaitNextEvent. Simply replace this code with your application's
- cursor code.
-
- DoEvent.c
- This is the code that dispatches for the different events. Replace code
- as necessary for your application.
-
- EventLoop.c
- This code does next to nothing, and therefore most likely doesn't have to
- change, or doesn't need to change much.
-
- File.c
- This is a (kind-of) generic file I/O unit. There are three functions that
- you will need to rewrite for your application's data structure. Otherwise,
- this code should not have to change much. These functions are:
- AppReadDocument: Reads in the application-specific data.
- AppWriteDocument: Write out the application-specific data.
- AppDuplicateDocument: Duplicates an opene document into a new window.
-
- Help.c
- This is the balloon help code. Kibitz supports dynamic balloon help in the
- content of the window. The code to do this is all here.
-
- IdleTasks.c
- Handle any NULL event tasks that you application has. For Kibitz, this is
- when the computer moves, if you have the computer moving pieces. This is
- also where network-game-resync events are handled.
-
- Init.c
- This initialization code is separated from the rest of the application
- because it isn't supposed to have to change. (Yea, right.)
-
- KibitzWindow.c
- This is where you will find the window code that is specific to Kibitz.
-
- Menu.c
- Application-specific menu code goes here.
-
- Print.c
- This print-loop code shouldn't have to change. It sets up a global that
- the ImageDocument function can use to determine if it is printing or not.
- This global is the page number to be printed. (If it is 0, then the
- application isn't printing.) If the user wants all pages printed, the
- print-loop keeps sending ImageDocument incrementally larger page numbers
- to print. ImageDocument is responsible for figuring out that there are no
- more pages to print. When there are no more pages, just set gPrintPage
- to zero and return. The print-loop won't call ImageDocument after that.
- (This print-loop code is ZZ approved, and may end up in the print-loop
- tech-note.)
-
- Setup.c
- This is application-specific code to set up a chess position or problem.
-
- Sound.c
- This is the (very little) code necessary for sound support. 7.0 sound
- is pretty easy stuff.
-
- Start.c
- This is the code that gets the application going. This is where you
- will find main().
-
- TextEditControl.c
- This is code for a TextEdit control. The control can easily be added to a
- window, just like any other control. The control handles clicks and key
- events. It also handles scrolling, cut/copy/paste/clear, as well as undo.
- (I think you will like this code.)
-
- Utils.c
- This is a catch-all for useful things I didn't know where else to put. You
- may like the code for key-equivalents for dialogs. The key-equivalents are
- put in the resource fork, so they can be localized.
-
- Window.c
- This is where all the generic window code lives.
-
-
- KIBITZ ASSEMBLY CODE:
-
- There is a little bit of assembly code needed for Kibitz. Here are some
- descriptions of those files:
-
- TextEditControl.a
- This is the assembly code glue for the TextEdit control.
-
- View.cdef.a
- This is a little assembly code for a control definition. It is just a cdef
- stub that jumps to the application code. This is very useful for custom
- controls that need to call the rest of the application. (The slider needs to
- redraw the board as you scroll for real-time scrolling. It also sends the
- opponent AppleEvents so the remost machine scrolls as well.)
-
-
-
- A useful file to look at is Kibitz.protos. This is where all function
- prototypes can be found. They are grouped based on source file, so you
- can use Kibitz.protos as a table of content (of sorts) to find various
- functions.
-
-
-
- Have fun in ’91.
-
- Eric Soldan
-